package com.ruoyi.Apps.Utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class PhoneUtil {

    public static boolean isMobile(String mobile)
    {

        if (mobile ==null || mobile.length() != 11)
        {
            return false;
        }
        // 移动号段正则表达式
        String pat1 = "^(1)\\d{10}$";

        Pattern pattern1 = Pattern.compile(pat1);
        Matcher match1 = pattern1.matcher(mobile);
        boolean isMatch1 = match1.matches();
        if(isMatch1){
            return true;
        }
        return false;

    }

}
